<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:s="http://jboss.com/products/seam/taglib">

	<ui:composition template="/WEB-INF/template.xhtml">
		<ui:define name="body">
			<f:subview id="no_records" rendered="#{!depositRecords.rowAvailable}">
                <p>You have not placed any deposit.</p>
            </f:subview>
			<f:subview id="depositsRecordSummary" rendered="#{depositRecords.rowAvailable}">
					<h:dataTable value="#{depositRecords}" var="record" >
						<h:column>
							<f:facet name="header">
								<h:outputText value="recordId" />
							</f:facet>
							<h:outputText value="#{record.id}" />
						</h:column>
						<h:column>
							<f:facet name="header">
								customer
							</f:facet>
							<h:outputText value="#{record.customer.userName}" />
						</h:column>
						<h:column>
							<f:facet name="header">
								depositAmount
							</f:facet>
							<h:outputText value="#{record.depositAmount}" />
						</h:column>
						<h:column>
							<f:facet name="header">
								depositTime
							</f:facet>
							<h:outputText value="#{record.depositTime}" />
						</h:column>
						<h:column>
							<f:facet name="header">status</f:facet>
							<h:outputText value="#{record.status}" >
								<s:convertEnum />
							</h:outputText>
						</h:column>
						<h:column>
							<s:button value="Cancel" action="#{showDepositsRecords.cancel}" rendered="#{record.open}" />
						</h:column>
					</h:dataTable>
					<s:button action="browse" value="Continue Shopping"/>
				
			</f:subview>
		</ui:define>
	
		<ui:define name="topnav">
            <ui:include src="/WEB-INF/incl/store_nav.xhtml">
                <ui:param name="page" value="depositRecord" />
            </ui:include>
        </ui:define>
        
        <ui:define name="sidebar">
            <ui:include src="/WEB-INF/incl/login.xhtml" />
            <ui:include src="/WEB-INF/incl/searchbox.xhtml" />
            <ui:include src="/WEB-INF/incl/cart.xhtml" />
        </ui:define>
	</ui:composition>

</html>